package cn.codergege.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

@Controller
@RequestMapping("/data-sync")
public class DataSyncHandler {
    private final Logger log = LoggerFactory.getLogger(DataSyncHandler.class);

    @RequestMapping("/full-table-sync")
    public String fullTableSync(Map<String, Object> map) {
        // 模拟获取数据, 需要 1 分钟
        try {
            Thread.sleep(1000*60);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "data-sync/result";
    }
}
